home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / wasm223.zip / MOOT.DOC < prev    next >
Text File  |  1993-05-04  |  15KB  |  423 lines

  1.  
  2.  
  3.  
  4.                           Multiple Boot (Moot) Utility
  5.  
  6.                                        by
  7.  
  8.                                    Eric Tauck
  9.                                1304 Deerpass Road
  10.                              Marengo, IL 60152-9644
  11.                                      U.S.A.
  12.  
  13.                              Compuserve: 72457,1557
  14.                        Internet: 72457.1557@compuserve.com
  15.  
  16.         Moot is a program that allows you to install multiple boot con-
  17.         figurations using a single set of CONFIG.SYS and AUTOEXEC.BAT
  18.         files.  Moot may work on DOS version 3 or later, but probably
  19.         requires version 4 or later.  Moot has been successfully tested
  20.         on MS DOS 4.01 and MS DOS 5.00.  IMPORTANT: before using Moot in
  21.         the CONFIG.SYS and AUTOEXEC.BAT files on your hard disk, you
  22.         should make sure Moot works on your system by testing Moot from a
  23.         floppy disk (rather than your hard disk).
  24.  
  25.         The file MOOT.EXE is both a device driver and a program you can
  26.         run from the DOS command line (or usually from the AUTOEXEC.BAT
  27.         batch file).  Commands are given to Moot by specifying them on
  28.         the command line.  Multiple commands may be specified, though
  29.         some commands may not work properly together (like CHOOSE, LOAD,
  30.         and SKIP).  The syntax for Moot in the CONFIG.SYS file is:
  31.  
  32.           DEVICE=MOOT.EXE [[prompt] [switches] [command]] ...
  33.  
  34.         The syntax for Moot in the AUTOEXEC.BAT file is:
  35.  
  36.           MOOT [[prompt] [switches] [command]] ...
  37.  
  38.         The prompt is a string, which consists of a sequence of charac-
  39.         ters surrounded by double quotes (").  Strings may contain the
  40.         following special two character sequences:
  41.  
  42.           \"      display quote character
  43.           \a      sound speaker (audible)
  44.           \e      embed escape character (ESC)
  45.           \f      clear the screen (formfeed)
  46.           \g      display "greater than" character (>)
  47.           \l      display "less than" character (<)
  48.           \n      start new display line (newline)
  49.           \p      display "pipe" character (|)
  50.  
  51.         All strings on the Moot command line are displayed (minus the
  52.         quotes) in the order they appear on the command line.  Note that
  53.         Moot does not automatically start a new line after displaying a
  54.         string (unless you use the ECHO command).  DOS usually converts
  55.         the CONFIG.SYS file into uppercase, so all Moot strings in the
  56.         CONFIG.SYS file will be in uppercase.  From the the DOS command
  57.         line and batch files, the characters <, >, and | may be treated
  58.         as commands rather than characters to display, you may have to
  59.  
  60.  
  61.  
  62.         use the special sequences described above to display these char-
  63.         acters.  If the ANSI.SYS driver has been loaded (or loaded before
  64.         Moot in the CONFIG.SYS file), you can use the \e sequence to
  65.         embed ANSI commands in your Moot strings.
  66.  
  67.         The following is a summary of the Moot switches and commands:
  68.  
  69.           Switches:
  70.  
  71.             /CASE           enable case-sensitive keys
  72.             /DEFAULT=n      set default selection to 'n'
  73.             /ECHO           enable keystroke echo
  74.             /REMOVE         remove driver after CHOOSE command
  75.             /SHOW=f         display text file 'f'
  76.             /TIME=t         set timeout value to 't'
  77.  
  78.           Commands:
  79.  
  80.             CHOICE          return CHOOSE selection
  81.             CHOOSE          select a block of CONFIG.SYS statements
  82.             CLEAR           clear the screen
  83.             CLS             clear the screen
  84.             ECHO s          display string s
  85.             INPUT k ...     input a keystroke
  86.             LINE            start a new display line
  87.             LOAD            optionally load a line
  88.             MOVE r c        move the cursor to row r and column c
  89.             SKIP            optionally skip a line
  90.  
  91.         Switches on the command line affect all subsequent commands.
  92.         Some of the switches have no effect with some commands (e.g.
  93.         /TIME with the CLEAR command).  Note that the /SHOW switch cannot
  94.         be used within CONFIG.SYS files.
  95.  
  96.         The keystroke data for the CHOOSE and INPUT commands are either
  97.         the ASCII code of the key or the extended DOS code times 256 for
  98.         extended keys (like the function keys).  Upper and lower case
  99.         letter keys are not distinguished from each other unless the
  100.         /CASE switch is used.  The following are the keystroke values for
  101.         some common keys:
  102.  
  103.           0 - 9   48 - 57
  104.           a - z   97 - 122
  105.           A - Z   65 - 90
  106.  
  107.           F1      15104
  108.           F2      15360
  109.           F3      15616
  110.           F4      15872
  111.           F5      16128
  112.           F6      16384
  113.           F7      16640
  114.           F8      16896
  115.           F9      17152
  116.  
  117.  
  118.  
  119.           F10     17408
  120.  
  121.           ENTER   13
  122.           SPACE   32
  123.           ESC     27
  124.  
  125.         The following is a complete description of each of the Moot
  126.         commands:
  127.  
  128.                                      CHOOSE
  129.                                      ------
  130.  
  131.         The CHOOSE command allows you to select different blocks of
  132.         statements in the CONFIG.SYS file for processing.  The syntax for
  133.         CHOOSE is:
  134.  
  135.           DEVICE=MOOT.EXE [prompt] [switches] CHOOSE
  136.           DEVICE=#1 [prompt] key
  137.           :
  138.           <normal CONFIG.SYS statements>
  139.           :
  140.           DEVICE=#2 [prompt] key
  141.           :
  142.           <normal CONFIG.SYS statements>
  143.           :
  144.           DEVICE=#END
  145.  
  146.         Up to 30 statement blocks may be specified, each with a number in
  147.         the range 1 to 99.  The statement blocks do not have to be in the
  148.         order of their block number, for instance block #2 could come
  149.         before block #1.  When the CHOICE command is executed from a
  150.         batch file, the block number selected in CONFIG.SYS file is
  151.         returned as an error code.  The character sequences #1 to #99 and
  152.         #END can only be used as part of a CHOOSE command within the
  153.         CHOOSE statement blocks.  The CHOOSE command can only be used
  154.         within the CONFIG.SYS file.
  155.  
  156.                                       CLEAR
  157.                                       -----
  158.  
  159.         The CLEAR command clears the screen using the color at the cursor
  160.         location and then moves the cursor to the upper left corner.  The
  161.         syntax for CLEAR is:
  162.  
  163.           DEVICE=MOOT.EXE CLEAR
  164.  
  165.           or
  166.  
  167.           MOOT CLEAR
  168.  
  169.  
  170.  
  171.                                        CLS
  172.                                        ---
  173.  
  174.         The CLS command clears the screen using the color at the cursor
  175.         location and then moves the cursor to the upper left corner.  The
  176.         syntax for CLS is:
  177.  
  178.           DEVICE=MOOT.EXE CLS
  179.  
  180.           or
  181.  
  182.           MOOT CLS
  183.  
  184.         This command is identical to the CLEAR command.
  185.  
  186.                                       ECHO
  187.                                       ----
  188.  
  189.         The ECHO command displays a prompt string.  The syntax for ECHO
  190.         is:
  191.  
  192.           DEVICE=ECHO string
  193.  
  194.           or
  195.  
  196.           MOOT ECHO string
  197.  
  198.           -----
  199.  
  200.           string  The string to display.
  201.  
  202.                                       INPUT
  203.                                       -----
  204.  
  205.         The INPUT command accepts a keystroke from the user and returns
  206.         an error code based on the keystroke.  The syntax for INPUT is:
  207.  
  208.           MOOT [prompt] [switches] INPUT key [key ...]
  209.  
  210.           -----
  211.  
  212.           key  A keystroke to input.  Multiple keystrokes may be speci-
  213.                fied and at least one keystroke is required.  The error
  214.                code returned is based on the position of the keystroke on
  215.                the command line.  The first keystroke returns error code
  216.                1, the second returns error code 2, etc.
  217.  
  218.         Batch files can use the code returned by INPUT to branch to
  219.         specific locations in a batch file.  The INPUT command can only
  220.         be used within batch files.
  221.  
  222.                                       LINE
  223.                                       ----
  224.  
  225.         The LINE command echos a carriage return and linefeed combina-
  226.  
  227.  
  228.  
  229.         tion, which starts a new display line.  The syntax for LINE is:
  230.  
  231.           DEVICE=MOOT.EXE LINE
  232.  
  233.           or
  234.  
  235.           MOOT LINE
  236.  
  237.                                       LOAD
  238.                                       ----
  239.  
  240.         The LOAD command lets you selectively load or ignore the next
  241.         line in the CONFIG.SYS file.  The syntax for LOAD is:
  242.  
  243.           DEVICE=MOOT.EXE [prompt] [switches] LOAD
  244.  
  245.         The LOAD command waits for the user to press 'Y' ("yes, load the
  246.         next line") or 'N' ("no, don't load the next line").  If a time-
  247.         out value is specified (/TIME), the default response is 'N'.  The
  248.         LOAD command can only be used within the CONFIG.SYS file.
  249.  
  250.                                      CHOICE
  251.                                      ------
  252.  
  253.         This CHOICE command returns the selection number (1 to 99) from
  254.         the last CHOOSE command.  The syntax for CHOICE is:
  255.  
  256.           MOOT CHOICE
  257.  
  258.         CHOICE returns a code of 255 if there's an error or the Moot
  259.         driver isn't installed.  Batch files can use the code returned by
  260.         CHOICE to branch to specific locations in a batch file.  This
  261.         command can only be used within batch files.  The CHOICE command
  262.         is executed by default if Moot is run without any command line
  263.         arguments.
  264.  
  265.                                       MOVE
  266.                                       ----
  267.  
  268.         The MOVE command positions the cursor.  The syntax for MOVE is:
  269.  
  270.           DEVICE=MOOT.EXE MOVE row column
  271.  
  272.           or
  273.  
  274.           MOOT MOVE row column
  275.  
  276.           -----
  277.  
  278.           row     is the screen row
  279.  
  280.           column  is the screen column
  281.  
  282.  
  283.  
  284.                                       SKIP
  285.                                       ----
  286.  
  287.         The SKIP command lets you selectively skip or load the next line
  288.         in the CONFIG.SYS file.  The syntax for SKIP is:
  289.  
  290.           DEVICE=MOOT.EXE [prompt] [switches] SKIP
  291.  
  292.         The SKIP command waits for the user to press 'Y' ("yes, skip the
  293.         next line") or 'N' ("no, don't skip the next line").  If a time-
  294.         out value is specified (/TIME), the default response is 'N'.  The
  295.         SKIP command can only be used within the CONFIG.SYS file.
  296.  
  297.                                     Examples
  298.                                     --------
  299.  
  300.         Here are example CONFIG.SYS and AUTOEXEC.BAT files, which are
  301.         similar to the actual files I use on my system.  Note that
  302.         MOOT.EXE is in the directory \UT.
  303.  
  304.         My CONFIG.SYS has three basic configurations: standard, debug-
  305.         ging, and clean.  The configuration is selected by pressing a
  306.         letter: 'S', 'D', or 'C'.  The standard configuration is used
  307.         most of the time and is selected by default after four seconds.
  308.         The debugging configuration is similiar to my standard configura-
  309.         tion, except it does not load the EMM386 driver.  The clean
  310.         configuration loads as little as possible for testing software
  311.         that may be incompatible with the device drivers and TSR's I
  312.         normally load.
  313.  
  314.           CONFIG.SYS
  315.           ----------
  316.  
  317.           files=30
  318.  
  319.           DEVICE=C:\UT\MOOT.EXE /time=3 CLS CHOOSE CLS
  320.  
  321.           DEVICE=#1 "S)TANDARD\n" 83
  322.           DEVICE=C:\UT\MOOT.EXE ECHO "*** STANDARD BOOT ***"
  323.           buffers=8
  324.           device=c:\os\himem.sys
  325.           device=c:\os\emm386.exe i=e000-f000 noems
  326.           dos=high,umb
  327.           devicehigh=c:\nu\ncache.exe /ext=-1100
  328.           devicehigh=c:\bc\tdh386.sys
  329.           shell=c:\nu\ndos.com c:\nu /e:640u /a:256 /h:512 /u /p
  330.  
  331.           DEVICE=#2 "D)EBUGGING\n" 68
  332.           DEVICE=C:\UT\MOOT.EXE ECHO "*** DEBUGGING BOOT ***"
  333.           buffers=8
  334.           device=c:\os\himem.sys
  335.           device=c:\nu\ncache.exe /ext=-1100
  336.           device=c:\bc\tdh386.sys -e1000
  337.           shell=c:\nu\ndos.com c:\nu /e:640 /a:256 /h:512 /p
  338.  
  339.  
  340.  
  341.           DEVICE=#3 "C)LEAN\n" 67
  342.           DEVICE=C:\UT\MOOT.EXE ECHO "*** CLEAN BOOT ***"
  343.           buffers=30,8
  344.           shell=c:\os\command.com c:\os /p
  345.  
  346.           DEVICE=#END
  347.  
  348.         My AUTOEXEC.BAT reflects the three main configurations stored in
  349.         the CONFIG.SYS file.  The first action performed is to run
  350.         MOOT.EXE to retrieve the configuration selection.  For each
  351.         configuration in the CONFIG.SYS file, the AUTOEXEC.BAT branches
  352.         to a different location.  My menu system is started by running
  353.         C:\UT\M, and at the end of this file a prompt is displayed and if
  354.         <ESC> is pressed within four seconds, my menu system is skipped.
  355.         If <SPACE> or <ENTER> is pressed, the menu system is entered
  356.         without waiting.
  357.  
  358.           AUTOEXEC.BAT
  359.           ------------
  360.  
  361.           c:
  362.           \ut\moot
  363.           IF ERRORLEVEL 3 GOTO clean
  364.           IF ERRORLEVEL 2 GOTO debug
  365.  
  366.           REM Standard Boot
  367.           :standard
  368.           lh \ut\autopark c: 3
  369.           lh \ut\mouse 2
  370.           set NDSHELL=/a:256 /h:512 /u /e+640u
  371.           GOTO configure
  372.  
  373.           REM Debugging Boot
  374.           :debug
  375.           \ut\autopark c: 3
  376.           set NDSHELL=/a:256 /h:512 /e+640
  377.           GOTO configure
  378.  
  379.           REM Clean Boot
  380.           :clean
  381.           path = c:\os;c:\ut;c:\nu
  382.           cd \misc
  383.           cls
  384.           GOTO byebye
  385.  
  386.           REM Standard and Debugging Configuration
  387.           :configure
  388.           alias format=*format %%& /u
  389.           alias copy=*copy %%& /r
  390.           alias move=*move %%& /r
  391.           set DIRCMD=/o:u
  392.           set NU=c:\nu
  393.           path = c:\br;c:\bc;c:\ut;c:\nu;c:\os;c:\ws
  394.  
  395.           REM Enter or Skip Menu System
  396.  
  397.  
  398.  
  399.           \ut\moot "\nPress ESC to skip shell." /time=3 input 32 13 27
  400.           IF ERRORLEVEL 3 GOTO skip
  401.           c:\ut\m
  402.  
  403.           REM Finished
  404.           :skip
  405.           cd \misc
  406.           cls
  407.           :byebye
  408.  
  409.                              DISCLAIMER OF WARRANTY
  410.                              ----------------------
  411.  
  412.         THIS SOFTWARE AND MANUAL ARE DISTRIBUTED "AS IS" AND WITHOUT
  413.         WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
  414.         WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS
  415.         HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
  416.         PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
  417.  
  418.         GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
  419.         THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
  420.         THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY
  421.         LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT
  422.         REPLACEMENT OR REFUND OF PURCHASE PRICE.
  423.